Repository navigation
feat(mobile): implement home feed, media library, image viewer, and video player (#120) - #149
Merged
Merged
Conversation
Owner
Author
|
Agent:审查结论:先修复(审查提交 整体架构清晰,依赖边界(规则 10、零站点请求、零内容落盘、断开即清空)、双层解码检测(Kotlin 阻塞问题
非阻塞建议(≤3)
审查范围与验证
|
chialecode
added a commit
that referenced
this pull request
Nov 26, 2026
…, and part mapping Addresses all 5 review findings (3 P1, 2 P2) + suggestions on PR #149: 1. [P1] Send includeAuthors=1 on library reset queries and unconditionally replace p.authors so switching to an empty site clears stale sources; tightened library_test.go server stub and added regression test. 2. [P1] Pass non-empty cursorKey (savedPos.Key) when jumping to deep saved reading positions so real desktop handleFeed activates keyset cursor filtering; tightened home_test.go server stub. 3. [P1] Wrap library filter sheet content in ui.Scroll with header pinned at top so 30+ sources scroll cleanly and 完成 button remains reachable; added 35-author sheet test. 4. [P2] Reset preserveOrder on cross-site switch and guard preserveOrder by subsSiteLoaded == site so switching all->bilibili->all restores live/unread-first order; added regression test. 5. [P2] Map partial multi-P and live recording segment buttons to filtered VideoRequest track indices and mark uncached (File=="") entries disabled/未缓存; added partial multi-P & live segment regression test. - Also refined Codeccheck.kt transposed size check to vcaps.isSizeSupported(h, w) and bumped viewer pill touch target heights. Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
Owner
Author
|
Agent:复审结论:可合并(复审提交 上轮阻塞项复核(5/5 已修复并带回归测试)
此外, 复审范围与验证证据
|
chialecode
force-pushed
the
feat/119-mobile-app-skeleton
branch
from
November 27, 2026 04:28
d7a2d1d to
eafaf05
Compare
…ideo player Implements mobile MVP issue #120 (FR-MOB-011..014, NFR-MOB-PERF-001, AC-94): - cmd/trace-mobile/internal/codeccheck: Android Kotlin MediaCodecList(ALL_CODECS) pre-check module with non-Android stub (no cgo required). - cmd/trace-mobile/internal/mediaview: Reusable full-screen Zoomable+PageView image viewer (?w=2560 default, full original toggle, Weibo 原图/无水印 companion toggle, live photo clip auto-play) and video player (plugins/videoplayer + loopback MediaProxy Range streaming, multi-P & live segment picker sheets, sequential live segment playback, landscape fullscreen via mygo.SetOrientations, two-layer unsupported-codec detection). - cmd/trace-mobile/internal/pages/home: Virtualized home feed (5000-item smooth scroll & <=2s first screen), 5-way site filter, horizontal subscription avatar strip (orange live ring, blue unread dot, shared POST /api/v1/feed/seen), per-device GET/PUT /api/v1/feed/position restore & save, desktop-styled PostCards with clickable http(s) links and zero volatile counts. - cmd/trace-mobile/internal/pages/library: Responsive 2/3/4-column virtualized grid (16:9 thumbnails, 2-line title, meta row), filter bottom sheet (type/site/source), tap-to-view/play, and read-only offline /library/item detail (zero FR-MOB-025 forbidden actions). Verification: - go run ./tools/check: PASS (4m56s, all packages, rule 10 dependency boundary, checkdocs, linux cross-build) - go test -v -count=1 ./cmd/trace-mobile/...: PASS (5000-item perf, shared seen, per-device position, Weibo no-watermark, live photo, two-layer codec check, 360x800/412x915/800x1280 zero overflow) - go tool mygo build -platform android/amd64 (JDK 17): PASS (54.6s, 18.5 MB APK) + emulator-5554 install/launch smoke (PID 9100, zero crash). Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
…, and part mapping Addresses all 5 review findings (3 P1, 2 P2) + suggestions on PR #149: 1. [P1] Send includeAuthors=1 on library reset queries and unconditionally replace p.authors so switching to an empty site clears stale sources; tightened library_test.go server stub and added regression test. 2. [P1] Pass non-empty cursorKey (savedPos.Key) when jumping to deep saved reading positions so real desktop handleFeed activates keyset cursor filtering; tightened home_test.go server stub. 3. [P1] Wrap library filter sheet content in ui.Scroll with header pinned at top so 30+ sources scroll cleanly and 完成 button remains reachable; added 35-author sheet test. 4. [P2] Reset preserveOrder on cross-site switch and guard preserveOrder by subsSiteLoaded == site so switching all->bilibili->all restores live/unread-first order; added regression test. 5. [P2] Map partial multi-P and live recording segment buttons to filtered VideoRequest track indices and mark uncached (File=="") entries disabled/未缓存; added partial multi-P & live segment regression test. - Also refined Codeccheck.kt transposed size check to vcaps.isSizeSupported(h, w) and bumped viewer pill touch target heights. Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
chialecode
force-pushed
the
feat/120-mobile-home-library-media
branch
from
November 27, 2026 05:11
8dff506 to
aaca5b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #120
做了什么
实现移动端 MVP 主页信息流、媒体库、全屏看图与视频播放(关联需求 FR-MOB-011~014、NFR-MOB-DATA-001、NFR-MOB-PERF-001、NFR-MOB-UI-001,验收场景 AC-94):
cmd/trace-mobile/internal/codeccheck/):通过 MyGo Kotlin 原生模块封装android.media.MediaCodecList(ALL_CODECS),查询视频(AV1 / HEVC / AVC / VP9 及分辨率范围)与音频(FLAC / 杜比)解码器支持;非 Android 平台无 cgo 优雅降级,并带可注入测试桩。cmd/trace-mobile/internal/mediaview/):ui/mobile.Zoomable双指缩放/双击放大 +ui/mobile.PageView左右滑动 + 顶部半透明栏(关闭、N / M、默认?w=2560与「查看原图」原文件切换、微博伴侣图「原图 / 无水印」切换 DEC-078)、实况照片左上角「实况」标记并翻到即经Host.MediaProxy()自动播放动态片段、切走/关闭立即撤销票据与销毁播放器。plugins/videoplayer+Host.MediaProxy()回环 Range 流式读取、分 P 底部选择面板(ui/mobile.Sheet)、直播录像多段自动顺播与分段面板、mygo.SetOrientations横屏全屏切换、双层不支持编码检测(Layer 1MediaCodecList预检 + Layer 2 运行期State.Error与 AndroidMediaPlayer静默丢视频Ready && Width==0 && Height==0兜底,明确提示如「这台手机不能播放 AV1 视频」而非「加载失败」)。ImageLoader),零落盘,断开连接时OnDisconnected()/CloseAllActive()立即清空并停止播放。cmd/trace-mobile/internal/pages/home/):五段站点筛选(全部 / B 站 / 抖音 / 微博 / X)、顶部横向订阅头像条(直播橙色圆环、未读蓝色圆点、点击进入单订阅视图并经POST /api/v1/feed/seen与电脑端共享已读、停留期间不重排)、每台设备独立阅读位置恢复与防抖保存(GET/PUT /api/v1/feed/position,不改动电脑端位置)、匹配电脑端样式的PostCard(单图比例 / 多图九宫格 ++N/ 实况标记 / 视频横向卡片 / 转发引用框 / 可点击http(s)外链,无易变数字与底部按钮)、下拉刷新与 5000 条虚拟化滚动。cmd/trace-mobile/internal/pages/library/):响应式虚拟网格(<600dp2 列、600~900dp3 列、>900dp4 列)、16:9 缩略图与两行标题/元信息行、ui/mobile.Sheet底部筛选面板(类型 / 站点 / 订阅与作者来源)、下拉刷新、点击直接看图或播放、长按或「⋯」打开只读离线本机详情/library/item(严格零删除/导出/导入/在线解析入口,FR-MOB-025)。docs/requirements.md(FR-MOB-011~014)与docs/delivery/roadmap.md(AC-94)。验证
go run ./tools/check(TRACE_QUIET=1,TRACE_REFERENCE_DIR指向本机参考目录):通过(退出码 0,用时4m56.6s,覆盖gofmt、go vet、go test ./...、依赖方向规则 10、trace-serverLinux 交叉构建、tools/checkdocs与git diff --check)。go test -v -count=1 ./cmd/trace-mobile/...:通过(app、codeccheck、mediaview、pages/home、pages/library全部通过;验证 5000 条合成主页/媒体库首屏<=2s、深处阅读位置恢复、共享feed/seen、设备独立feed/position、微博原图/无水印、实况片段自动播放、双层编解码检测,以及360×800/412×915/800×1280三档宽度零横向溢出与截图)。.mygo/android/gradlew.bat):go tool mygo build -platform android/amd64通过(54.6s,产出trace-0.1.0.apk18.5 MB /trace-0.1.0.aab9.7 MB,确认qrscanner与新codeccheckKotlin 原生模块均编通)。emulator-5554):adb install -r成功,启动io.github.chialecode.trace(PID 9100),logcat AndroidRuntime:E无崩溃。not-run:Android 真机手势缩放、真实局域网回环播放与 TalkBack 朗读(留待 MVP 合流后建needs-user实机检查);go test -race(本机无 cgo)。风险
未触碰
docs/dev-rules/workflow.md#high-risk高风险清单(不改动数据文件结构、持久化、凭证、更新签名或工作流;手机端零站点请求、零内容落盘)。risk:high,等用户合并)每个提交都带
Signed-off-by(git commit -s)。